﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;

namespace RSSReader
{

    public class aaa
    {
    }

    public class RssChannel : RssItem
    {
        private string _lastPost = "";
        public string LastPost
        {
            get { return _lastPost; }
            set { _lastPost = value; }
        }

        public RssChannel()
            : base()
        {
        }

        public RssChannel(string link)
            : base(link)
        {
        }

        public RssChannel(string title, string link)
            : base(title, link)
        {
        }

        public RssChannel(string title, string link, string description)
            : base(title, link, description)
        {
        }


        public RssChannel(string title, string link, string description, string lastPost)
        {
            this.Title = title;
            this.Link = link;
            this.Description = description;
            this.LastPost = lastPost;
        }

        #region ICloneable 멤버

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            return new RssChannel(this.Title, this.Link, this.Description, this.LastPost);
        }

        #endregion
    }

    public class RssItem : ICloneable
    {
        private string _title = "";
        private string _link = "";
        private string _description = "";

        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

        public string Link
        {
            get { return _link; }
            set { _link = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public RssItem()
        {
        }

        public RssItem(string link)
        {
            this.Link = link;
        }

        public RssItem(string title, string link)
        {
            this.Title = title;
            this.Link = link;
        }

        public RssItem(string title, string link, string description)
        {
            this.Title = title;
            this.Link = link; 
            this.Description = description;
        }

        #region ICloneable 멤버

        public virtual object Clone()
        {
            return new RssItem(_title, _link, _description);
        }

        #endregion
    }    
}
